package com.crm.constant.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @version 1.0
 * @author: CRM_SYSTEM
 * @date: 2022/4/1 12:10
 * @Description:
 */
@AllArgsConstructor
@Getter
public enum ProjectStatusEnum {

    /**
     *
     */
    PROJECT_NOT_START(1003101, "未开始"),
    PROJECT_ORDER_IN(1003102, "预约中"),
    PROJECT_ORDER_END(1003103, "预约结束"),
    PROJECT_START(1003104, "进行中"),
    PROJECT_END(1003105, "已结束"),
    PROJECT_CANCEL(1003106, "已取消"),
    ;


    private Integer code;
    private String value;

    public static ProjectStatusEnum getByCode(Integer code){
        if (code==null){
            return null;
        }
        for (ProjectStatusEnum statusEnum : ProjectStatusEnum.values()) {
            if (statusEnum.code.equals(code)){
                return statusEnum;
            }
        }
        return null;
    }

}
